#ifndef _TEXTRENDERFEATURE_H_
#define _TEXTRENDERFEATURE_H_
#include <SERender/Renderer/RenderFeature/RenderFeature.h>
#include <unordered_map>
#include <string>
#include <memory>
#include <SERender/Entity/Drawable.h>

namespace SEngine
{


    class TextRenderFeature : public RenderFeature
    {
    public:
        using ID = std::string;
    public: 
        TextRenderFeature(Renderer & renderer) : RenderFeature(renderer) {}
        virtual ~TextRenderFeature() = default;
        virtual void BeginFrame() override {}
        virtual void EndFrame() override {}
        void DrawTypes(char ch, glm::ivec2 size, glm::vec4 color = glm::vec4{1.0f}, glm::mat4 modelMatrix = glm::mat4{1.0f});

    private:
        ID ToID(char ch, glm::ivec2 size);
        void AddChar(char ch, glm::ivec2 size);

    private:
        std::unordered_map<std::string, std::unique_ptr<Drawable>> m_charTable;

    };
} // namespace SEngine


#endif